function refreshChallenge() {
	let button = document.getElementById('btn-challenge-refresh');
	button.disabled = true;
	let xhr = new XMLHttpRequest();
	xhr.onload = function (e) {
		if (e.returnValue) {
			// data shall be <svg />
			document.getElementById('challenge-box').innerHTML = e.target.response;
			window['challengeAccepted'] = true;
		} else {
			console.log('Cannot get challenge');
			window['challengeAccepted'] = false;
		}
		button.disabled = false;
	};
	xhr.open('GET', '/challenge');
	xhr.send();
}
